#ifndef RESERVATIONDATAACCESSOR_H
#define RESERVATIONDATAACCESSOR_H

#include "../../Headers/Classes/db.h"
#include "../../Headers/Classes/reservation.h"
#include "../../Headers/Classes/room.h"

#include <QString>
#include <QSqlTableModel>
#include <QSqlQueryModel>
#include <QSqlRelationalTableModel>
#include <QSqlQuery>

class ReservationDataAccessor : public DB
{
public:
    ReservationDataAccessor(QString databaseName = "kursovik.sqlite");
    QSqlQueryModel * getReservations();
    QSqlQueryModel * getReservationsWithFilter(QString searchString);
    bool setReservation(Reservation reservation);
    Reservation * getReservation(int id);
    bool deleteReservation(Reservation reservation);
    bool editReservation(Reservation reservation);
};

#endif // RESERVATIONDATAACCESSOR_H
